package com.hzdesk.media.koreabatchmatvector.request;

import android.content.Context;

import com.hzdesk.media.koreabatchmatvector.inter.ICallBack;


/**
 * Created by Administrator on 2018/5/25.
 */

public class GetAdvertInfoRequest {
    private static final String TAG = GetAdvertInfoRequest.class.getSimpleName();
    private Model model = Model.getInstance();
    private Context context;
    private String Url;

    public GetAdvertInfoRequest(Context context, String url) {
        this.context = context;
        Url = url;
    }

    public interface onGetAdvertInfoListener {
        void success();

        void fail(String s);
    }
    private  onGetAdvertInfoListener onGetAdvertInfoListener;

    public void setOnGetAdvertInfoListener(GetAdvertInfoRequest.onGetAdvertInfoListener onGetAdvertInfoListener) {
        this.onGetAdvertInfoListener = onGetAdvertInfoListener;
        getRequest(Url);
    }
    public void getRequest(String url) {
        model.getSynchronized(context, url, new ICallBack() {
            @Override
            public void result(String s) {
                System.out.println(TAG+":"+s);

            }
        });
    }
}
